Letter Case Permutation
1 | Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible strings we could create. |
图解
字符的大小写转换:
char a = ‘a’;// a= ‘A’
char s = a ^= 1 << 5;
使用深度优先搜索
1 | public class LetterCasePermutation { |